<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition   xmlns="http://www.w3.org/1999/xhtml"
			      xmlns:h="http://java.sun.com/jsf/html"
				  xmlns:p="http://primefaces.org/ui"
			      xmlns:f="http://java.sun.com/jsf/core"
			      xmlns:ui="http://java.sun.com/jsf/facelets"
			      >
			   
			   
	<p:panel header="Search Options" toggleable="true" toggleOrientation="vertical" collapsed="false">  
   		<p:panelGrid columns="4" style="margin-bottom:10px;font-size:14px;" cellpadding="5">  
	  
	        <h:outputText value="Country: " /> 
	        <p:selectOneMenu style="width:180px" id ="UnmappedCountries" value="#{unmappedItemsBean.country}">
	        	<f:selectItem itemLabel="--Select Country--" itemValue="" />    
	            <f:selectItems value="#{servicesManagedBean.allCountriesList}" />   
	        </p:selectOneMenu>      
	         
	         <p:column colspan="7">  
	        <p:commandButton value="GO" update="unMappedTableP @form" action="#{unmappedItemsBean.updateList}" />
	        </p:column> 
	        
	         <p:column colspan="7">  
	        
	                <h:commandLink rendered="#{unmappedItemsBean.methodCalled}">  
        <p:graphicImage value="NWDSAKMS-excel-logo.png" width="30" height="30" title="Export to Excel"  style="border:0"/>  
        <p:dataExporter type="xls" target="unMappedTable" fileName="Unmapped_Items_#{servicesManagedBean.dateNow}.xls" />  
    </h:commandLink>
    
	        </p:column> 
	        
	        
	        
	  
    	</p:panelGrid>
    
    </p:panel>  
    
    <p:panel id="unMappedTableP">  
<p:dataTable     id="unMappedTable" style="margin-top:5px" rendered="#{unmappedItemsBean.methodCalled}" var="item" value="#{unmappedItemsBean.unmappedItemList}"  
                 paginator="true" rows="17"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="20,40,60,80" 
                 lazy="true"    
                 scrollRows="17" 
                 >  
        <f:facet name="header">  
            Unmapped Items
        </f:facet> 
        
        <p:column>  
            <f:facet name="header">  
                    Distributor
            </f:facet>  
            <h:outputText value="#{item.distributorNo}" />  
        </p:column>  
        
        <p:column>  
            <f:facet name="header">  
                    Country
            </f:facet>  
            <h:outputText value="#{item.country}" />  
        </p:column>  
  
        <p:column>  
            <f:facet name="header" >  
                    Dist. Material 
            </f:facet>  
            <h:outputText value="#{item.distMaterial}"/> 
        </p:column>  
  
        <p:column>
        <f:facet name="header" >  
                    Uni Material
            </f:facet>  
            <h:outputText value="#{item.uniMaterial}"/> 
        </p:column>  
       
       <p:column>
        <f:facet name="header" >  
                    Inv. Quantity
            </f:facet>  
            <h:outputText value="#{item.invQuantity}"/> 
        </p:column> 
         
        <p:column>
        <f:facet name="header" >  
                    Inv. Value
            </f:facet>  
            <h:outputText value="#{item.invValue}"/> 
        </p:column>  
      
       <p:column>
        <f:facet name="header" >  
                    Stk Quantity
            </f:facet>  
            <h:outputText value="#{item.stkQuantity}"/> 
        </p:column> 
         
        <p:column>
        <f:facet name="header" >  
                    Stk Value
            </f:facet>  
            <h:outputText value="#{item.stkValue}"/> 
        </p:column>  
        
             <p:column>
        <f:facet name="header" >  
                    UOM
            </f:facet>  
            <h:outputText value="#{item.uom}"/> 
        </p:column> 
         
        <p:column>
        <f:facet name="header" >  
                    Curr
            </f:facet>  
            <h:outputText value="#{item.currency}"/> 
        </p:column>      
        
   
    </p:dataTable>
    </p:panel>
  
    
  
</ui:composition>